const { defineConfig } = require('@vue/cli-service')

module.exports = defineConfig({
    transpileDependencies: true,
    lintOnSave: false,
    publicPath: '/',
    devServer: {
        port: 8081,
        proxy: {
            '/api': {
                target: 'http://localhost:8080', // 后端服务地址
                changeOrigin: true,               // 支持跨域
                secure: false,                    // 如果是 https 接口，可设为 true
                pathRewrite: {
                    '^/api': '/api'                 // 不重写路径，直接转发
                }
            }
        },
        client: {
            overlay: false,
        }
    }
})
